import request from '@/config/axios'
import type { Dayjs } from 'dayjs';

/** 汇报标签用户信息 */
export interface ReportingTagUser {
          id: number; // 编号
          tagId?: number; // 标签Id
          userId?: number; // 用户Id
  }

// 汇报标签用户 API
export const ReportingTagUserApi = {
  // 汇报标签id查用户分页
  list: async (params: any) => {
    return await request.get({ url: `/system/reporting-tag/tagUser/list-by-tag-id`, params })
  },
  // 查询汇报标签用户分页
  getReportingTagUserPage: async (params: any) => {
    return await request.get({ url: `/system/reporting-tag-user/page`, params })
  },

  // 查询汇报标签用户详情
  getReportingTagUser: async (id: number) => {
    return await request.get({ url: `/system/reporting-tag-user/get?id=` + id })
  },

  // 新增汇报标签用户
  createReportingTagUser: async (data: ReportingTagUser) => {
    return await request.post({ url: `/system/reporting-tag-user/create`, data })
  },

  // 修改汇报标签用户
  updateReportingTagUser: async (data: ReportingTagUser) => {
    return await request.put({ url: `/system/reporting-tag-user/update`, data })
  },

  // 删除汇报标签用户
  deleteReportingTagUser: async (id: number) => {
    return await request.delete({ url: `/system/reporting-tag-user/delete?id=` + id })
  },

  /** 批量删除汇报标签用户 */
  deleteReportingTagUserList: async (ids: number[]) => {
    return await request.delete({ url: `/system/reporting-tag-user/delete-list?ids=${ids.join(',')}` })
  },

  // 导出汇报标签用户 Excel
  exportReportingTagUser: async (params) => {
    return await request.download({ url: `/system/reporting-tag-user/export-excel`, params })
  },
}